package com.atguigu.hdfs;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

public class HdfsClient {

    @Test
    public void testmkdir() throws URISyntaxException, IOException {

        URI uri = new URI("hdfs://hadoop01:8020");

        Configuration configuration= new Configuration();

        FileSystem fs = FileSystem.get(uri,configuration);

        fs.mkdirs(new Path("/xiyou/huaguoshan"));

        fs.close();

    }
}
